home *** CD-ROM | disk | FTP | other *** search
- ; ROUTINE TO SET TONE;
- ; define control bit field parameters for the timer chip
- sc = 2 ; use counter 2
- rl = 3 ; mode to load period one byte
- ; at a time
- mode = 3 ; square wave generator
- bcd = 0 ; not bcd, use binary values;
- ; form control word
- cnword = sc*40h + rl*10h + mode*2 + bcd
- ;
- toneinit proc far;
- push ax ; save registers
- ; send control word to 8253 timer chip
- mov al,cnword ; select the above control word
- out 43h,al ; send it out the control port
- ; pop ax ; restore registers
- ret
- ;
- toneinit endp
-